Repository navigation
Support ordinal (argument mode for emmeans backend - #669
Conversation
|
The 0.333 values are expected emmeans behavior. With |
…th the emmeans backend (#670) * Add tests for ordinal modes with the emmeans backend (failing) * Return per-category and per-threshold estimates for ordinal models with the emmeans backend * Update NEWS entry for ordinal models with the emmeans backend * Fix ordinal emmeans output for transformed responses, plot names, and docs - Name the response pseudo-factor after the formula's left-hand side, so that models with e.g. factor(y) as response no longer fail. - Add Latent, Linear_predictor, and Mean_class to the known estimate names. - Document the ordinal modes and the "prob" default for estimate_means(). - Check the number of matched rows in the glmmTMB test.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve ordinal mode handling, preserve non-ordinal behavior, correct inherited documentation, and ensure tests run independently.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds ordinal-model support for the emmeans backend in estimate_means(), with updated output handling, tests, documentation, NEWS, and version metadata.
Changes:
- Routes ordinal predictions through
emmeansmodes. - Normalizes ordinal output columns.
- Adds ordinal backend tests and documentation updates.
| File | Summary |
|---|---|
tests/testthat/test-ordinal.R |
Adds ordinal backend coverage. |
R/utils.R |
Adds ordinal estimate column names. |
R/get_emmeans.R |
Implements ordinal mode handling and formatting. |
R/estimate_means.R |
Documents ordinal prediction modes. |
NEWS.md |
Records the new functionality. |
man/get_emmeans.Rd |
Updates generated documentation. |
man/estimate_slopes.Rd |
Updates inherited documentation. |
man/estimate_means.Rd |
Updates generated documentation. |
man/estimate_contrasts.Rd |
Updates inherited documentation. |
DESCRIPTION |
Increments the package version. |
Files not reviewed (4)
- man/estimate_contrasts.Rd: Generated file
- man/estimate_means.Rd: Generated file
- man/estimate_slopes.Rd: Generated file
- man/get_emmeans.Rd: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jmgirard is there something I am missing, or is this the expected output? For
polr::MASS, the result is the same. Not sure I'm missing a combination ofmodeandtypearguments, or how are ordinal models handled?Created on 2026-09-30 with reprex v2.1.1